<?php //pack11class

class ObjectsListItemBodyPhoto extends ObjectsListItem {

    protected $object;
    public $traceEnabled=true;

	public function setup() {
        $object=$this->object=$this->parent->getObject();
        $properties=$object->usedProperties();
        $photoProperties=PropertiesManager::getGroup(4);
        $photos=$object->getPhotos();
        if(!$photos) {
            $this->setBody("noPhoto.gif");
        } else {
            $photo=$photos[array_rand($photos)];
            $this->setBody($photo->string);
        }
    }

}
?>
